package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo {
    public static void main(String[] args) throws IOException {
        FileInputStream fi = new FileInputStream("./test.txt");
        FileOutputStream fo = new FileOutputStream("./cp_test.txt");

        int x;
        while ((x = fi.read())!=-1){
            fo.write(x);
        }

    }
}
